<?php
// No direct access
defined('_JEXEC') or die('Restricted access');

// Set the table directory
JTable::addIncludePath(JPATH_COMPONENT.DS.'tables');

// Require the base controller
require_once(JPATH_COMPONENT.DS.'controller.php');

// Require specific controller if requested
if( $controller = JRequest::getWord('controller') ) {
	$path = JPATH_COMPONENT.DS.'controllers/'.DS.$controller.'.php';
	if(file_exists($path)){
		require_once $path;
	} else {
		$controller = '';
	}
}

date_default_timezone_set('Australia/Sydney');
$datenow =& JFactory::getDate();
echo $datenow->toMySQL();

// Create the controller
$classname = 'OwnserviceController'.ucfirst($controller);;
$controller = new $classname();

// Perform the Request task
$controller->execute( JRequest::getWord('task'));
$controller->redirect();